#include<unistd.h>
#include<stdlib.h>
#include<stdio.h>
#include<sys/wait.h>
int main()
{
	printf("i am a process ,pid :%d\n",getpid());
	pid_t id=fork();
	if(id==0)
	{
		execl("/usr/bin/ls","ls","-a","-l",NULL);
		perror("execl failed");
		exit(EXIT_FAILURE);
	}
	else
	{
		wait(NULL);
		printf("Child process completed.\n");
	}
	return 0;

}

